﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDialog>
#include <Ice/Ice.h>
#include <Glacier2/Glacier2.h>
#include <IceStorm/IceStorm.h>
#include "RobotDef.h"
#include <QDebug>
#include <QThread>
#include "callbackctrli.h"
#include <QTimer>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void init();

private slots:
    void on_pushButton_clicked();

    void time_out();
public slots:
    void slot_notify(int state, const QString &content);
    void slot_wrtie_text(QString text);
private:
    Ui::MainWindow *ui;

    Glacier2::SessionFactoryHelperPtr _factory;
    Glacier2::SessionHelperPtr _session;
    NetWorkRobot::RegCallBackPrx m_prxRegCallBack;
    NetWorkRobot::CallBackPrx m_prxCallBack;

    CallBackCtrlI *m_pCallBackCtrl;
    MySessionCB *m_pSessionCallBack;
    QTimer *m_timer;
    QString getHostMacAddress();
    void installCallBack();
};

#endif // MAINWINDOW_H
